#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<fstream>
#include<string>
#include<cmath>
#include<cstdlib>
#include<ctime>
#include<vector>
#include<algorithm>
#include"contact.h"
using namespace std;

void test_01()
{
	/*SeqList *ps;
	PeoInfo p;
	strcpy(p.name, "lily");
	strcpy(p.sex, "girl");
	p.age = 18;
	strcpy(p.tel, "13568453658");
	strcpy(p.add, "China");

	ps->a[++ps->size] = p;

	SLPrint(ps);*/
}

void test()
{
	SeqList* ps = (SeqList*)malloc(sizeof(SeqList));
	InitContact(ps);
	//AddContact(ps);
	//////////////////
	PeoInfo p;
	strcpy(p.name, "lily");
	strcpy(p.sex, "girl");
	p.age = 18;
	strcpy(p.tel, "13568453658");
	strcpy(p.add, "China");

	ps->a[++ps->size] = p;

	PeoInfo pp;
	strcpy(pp.name, "mike");
	strcpy(pp.sex, "girl");
	pp.age = 18;
	strcpy(pp.tel, "13568453658");
	strcpy(pp.add, "China");

	ps->a[++ps->size] = pp;

	////////////
	ShowContact(ps);

	//DelContact(ps);


	ModifyContact(ps);
	ShowContact(ps);

	//FindContact(ps);


	DestroyContact(ps);
}


int main()
{
	test();
	return 0;
}